<!DOCTYPE html>
<html lang="zh">
<head>
  <meta charset="UTF-8">
  <title>全局函数</title>
</head>
<body>

  <script !src="">

    /*
    parseInt()  将字符串的数字内容转为数字类型

    parsetFloat() 将字符串的浮点类型转为浮点类型

     */

    var str = "a123bc";

    var strNum = parseInt(str);

    console.info(str+"----------"+(typeof str));
    console.info(strNum+"----------"+(typeof strNum));


    /*
      isNaN()
      NaN 六亲不认
     */
    var num2 = NaN;
    console.info(isNaN(num2));


    var str = "alert(111)";

    eval(str);

  </script>

</body>
</html>